<?php

  error_reporting(E_ALL ^ E_NOTICE ^ E_WARNING );
 

  include_once "config.php";

  define('__CFG_CLIENT_SCRIPT', __FALSE);

  include_once __CFG_PATH_CODE."loader.php";
  require_once __CFG_PATH_LIBS . __CFG_PATH_CORE."user.inc";
  require_once __CFG_PATH_LIBS . __CFG_PATH_CORE."news.inc";
  header('Content-type: text/html; charset='.$language['charset']);
  $SmartyTplName = 'frontend.main.tpl';

  //$xmlp->setFlag('ShowXML',__TRUE);

  if($_GET['act'] == 'sitemap.xml')
  {
    include_once __CFG_PATH_CODE."sitemap.xml.php";
  }
  elseif($_GET['_a1'] == 'iepngfix.htc')
  {
    include_once __CFG_PATH_CODE."iepngfix.htc.php";
  }
  elseif($_GET['_a1'] == 'showcode')
  {
    include_once __CFG_PATH_CODE."showcode.php";
  }
  elseif($_GET['_a1'] == 'images')
  {
    include_once __CFG_PATH_CODE."images.php";
  }
  elseif($_GET['_a1'] == 'robots.txt')
  {
    include_once __CFG_PATH_CODE."robots.txt.php";
  }
  elseif($_GET['_a1'] == 'style.css')
  {
    include_once __CFG_PATH_CODE."style.css.php";
  }
  else
  {
  	/*$stat = new Statistic();
  	$stat->catchRefHost();
  	$stat->catchVisitor();*/
  	include_once __CFG_PATH_CODE."main.php";
  }

  $pct->assignParams();
  $tpl->cache_lifetime = 0;
  $tpl->caching = 0;
  $output = $tpl->fetch($SmartyTplName);
  echo $output;

  $Timer->stop("common");
  //$Timer->display();


?>
